package com.ccc.dao.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;

import com.ccc.dao.FundDao;
import com.ccc.model.Fund;
import com.ccc.util.dao.UtilDao;

@Component("fundDao")
public class FundDaoImpl implements FundDao {

	@Resource
	private UtilDao utilDao;

	@Override
	public void addFund(Fund fund) {
		utilDao.save(fund);
	}

	@Override
	public void deleteFund(Fund fund) {
		utilDao.delete(fund);
	}

	@Override
	public void updateFund(Fund fund) {
		utilDao.update(fund);
	}

	@Override
	public Fund findFund(int id) {
		return utilDao.find(Fund.class, id);
	}

	@Override
	public List<Fund> findFund(String hql, Object[] o) {
		return utilDao.find(hql, o);
	}

}
